package one.stand.mapper;

import one.stand.model.AddressModel;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author qik
 */
public interface AddressMapper {
    /**
     * @param addressId 地址id
     * @return
     */
    int deleteByPrimaryKey(Integer addressId);

    /**
     * @param ids 地址id
     * @return
     */
    int deleteAddress(String[] ids);

    /**
     * @param record t
     * @return
     */
    int insert(AddressModel record);

    /**
     * @param record
     * @return
     */
    int insertSelective(AddressModel record);

    /**
     * @param addressId
     * @return
     */
    AddressModel selectByPrimaryKey(@Param("addressId") Integer addressId);

    int updateByPrimaryKeySelective(AddressModel record);

    int updateByPrimaryKey(AddressModel record);

    int updateIsdefault(AddressModel record);

    List<AddressModel> select(AddressModel record);

    /**
     * @param userId
     * @return
     */
    List<AddressModel> selectDefault(@Param("userId") Integer userId);

    Integer selectDefaultCount(@Param("userId") Integer userId);
}